import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'home',
        component: () => import('@/views/HomeView')
    },
    {
        path: '/datasource',
        name: 'datasource',
        component: () => import('@/views/DataSource')
    },
    {
        path: '/config',
        name: 'config',
        component: () => import('@/views/BaseConfig')
    },
    {
        path: '/log',
        name: 'log',
        component: () => import('@/views/OperationLog')
    },
    {
        path: '/updateTable',
        name: 'updateTable',
        component: () => import('@/views/codegen/UpdateTable')
    }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
